package com.muyi.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyi.mapper.TagMapper;
import com.muyi.pojo.entity.Tag;
import com.muyi.service.TagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author VRMMO
* @description 针对表【tag】的数据库操作Service实现
* @createDate 2025-06-11 15:04:41
*/
@Service
public class TagServiceImpl extends ServiceImpl<TagMapper, Tag>
    implements TagService{
    @Autowired
    private TagMapper tagMapper;

    @Override
    public List<Tag> list() {
        return tagMapper.list();
    }

    @Override
    public void delete(Integer tag_id) {
        tagMapper.deleteById(tag_id);
    }

    @Override
    public void add(Tag tag) {

        tagMapper.insert(tag);
    }

    @Override
    public void update(Tag tag) {
        tagMapper.update(tag);
    }

    @Override
    public Tag getByTagId(Integer tag_id) {
        return tagMapper.getByTagId(tag_id);
    }


}




